/*
 * @Author: your name
 * @Date: 2022-01-22 10:53:30
 * @LastEditTime: 2022-01-22 11:19:30
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \my-app\src\store\reducer\index.ts
 */
import data from '../state'
const reducer = (state = data, action: any) => {
	switch (action.type) {
		case 'ADD':
			return Object.assign({}, state, { total: state.total + action.data })

		default:
			return state
	}
}

export default reducer
